Rectify: Ingredient Key Normalization and Issue-URL Extraction Immunity#4117
Merged
Trecek merged 3 commits intoJun 26, 2026
Merged
Conversation
Trecek
commented
Jun 26, 2026
Trecek
left a comment
Collaborator
Author
There was a problem hiding this comment.
AutoSkillit PR Review — Verdict: approved. No blocking issues found.
The 7th occurrence of the label-orphaning bug class was caused by a singular/plural ingredient key mismatch: _api.py read only "issue_urls" (plural) but implementation/remediation recipes define "issue_url" (singular), silently producing _issue_urls_raw="" and defeating the DispatchRecord.issue_url fallback (deb5d55) and downstream label cleanup. Three-layer architectural immunity: 1. Canonical extraction function extract_issue_urls() in a new _issue_url_helpers.py module — single dual-key accessor (plural wins, singular fallback) used by _api.py:656. 2. AST guard (test_issue_url_extraction_guard.py): - BANS raw .get("issue_url") / .get("issue_urls") in fleet/ except in _issue_url_helpers.py (defines the canonical accessor) and state_types.py (deserializes DispatchRecord from its own JSON dict). - Asserts positive dual-key completeness in fleet_claim_guard.py — the stdlib-only hook cannot import the canonical helper and keeps its inline pattern; the test guarantees both key variants remain present. 3. Integration tests in test_dispatch_labels_cleaned.py dispatch with singular-key ingredients and no sidecar, asserting swap_labels fires via the issue_url fallback and DispatchRecord.issue_url is populated. Registry updates: - tests/arch/test_subpackage_isolation.py: fleet file-count ceiling 22 -> 23 - src/autoskillit/fleet/AGENTS.md: register _issue_url_helpers.py - tests/fleet/AGENTS.md: register test_issue_url_extraction.py - tests/arch/AGENTS.md: register test_issue_url_extraction_guard.py Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The test imports autoskillit.recipe.schema.RecipeIngredient but was missing from LAYER_CASCADE_CONSERVATIVE["recipe"] file-level entries, causing test_cascade_map_guard to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2b3bda2 to
4346239
Compare
…int catalog The new AST guard added in fa4e7a9 was not registered in the Architectural Constraint Catalog in resolve-review/SKILL.md, causing test_catalog_reverse_coverage to fail in CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 7th occurrence of the label-orphaning bug class was caused by a singular/plural ingredient key mismatch:
_api.py:656reads only"issue_urls"(plural) but implementation/remediation recipes define"issue_url"(singular). This silently produces_issue_urls_raw = "", defeating theDispatchRecord.issue_urlfallback (commitdeb5d55) and all downstream label cleanup paths.The fix applies three layers of architectural immunity:
extract_issue_urls()) in a new_issue_url_helpers.pymodule — the single dual-key accessor used by_api.py.test_issue_url_extraction_guard.py) — bans raw.get("issue_url")/.get("issue_urls")calls infleet/(except the helper module andstate_types.py), AND asserts positive dual-key completeness infleet_claim_guard.py.Closes #4112
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/remediation-20260626-113727-764361/.autoskillit/temp/rectify/rectify_ingredient_key_normalization_2026-06-26_120000.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown